#include <stdio.h>
#include <string.h>

void swag(char* p)
{
    char* q = p+strlen(p)-1;
    char temp = 0;
    while(p < q)
    {
        temp = *p;
        *p = *q;
        *q = temp;
        p++;
        q--;
    }
}

int main()
{
    
    char arr[] = "abcdef";
    swag(arr);
    int i = 0;
    printf("%s", arr);
    return 0;
}